﻿var $;
layui.config({
	base : "js/"
}).use(['form','layer','jquery'],function(){
	var form = layui.form,
		layer = parent.layer === undefined ? layui.layer : parent.layer,
		laypage = layui.laypage;
		$ = layui.jquery;
		
		form.on("submit(updateClassification)",function(data){
			
	 		//弹出loading
	 		var index = top.layer.msg('数据提交中，请稍候',{icon: 16,time:false,shade:0.8});
	        setTimeout(function(){
	        	$.ajax({
	                type: "POST",
	                async:false,
	                url: ctx+"/classification/updateClassification",
	                data:$("#arf").serialize(),
	            });
	            top.layer.close(index);
				top.layer.msg("分类修改成功！");
	 			layer.closeAll("iframe");
		 		//刷新父页面
		 		parent.location.reload();
	        },2000);
	 		return false;
	 	})
 	
 
})


	




$("#checkAllTrue").bind("click", { type: "checkAllTrue" }, checkNode);
$("#checkAllFalse").bind("click", { type: "checkAllFalse" }, checkNode);